package piirto;

public class TickMarks {

public static double increment(float width, double ppmLength){
	
	double inc = 0;
	
	if(ppmLength<=0.02)
	inc=width/(ppmLength*10000);   
	else if(ppmLength<=0.04)
	inc=width/(ppmLength*5000);
	else if(ppmLength<=0.1)
	inc=width/(ppmLength*2000);
	else if(ppmLength<=0.133)
	inc=width/(ppmLength*1000);
	else if(ppmLength<=0.4)
	inc=width/(ppmLength*500);
	else if(ppmLength<=1)
	inc=width/(ppmLength*200);
	else if(ppmLength<=1.33)
	inc=width/(ppmLength*100);
	else if(ppmLength<=2.6)
	inc=width/(ppmLength*50);
	else if(ppmLength<=10)
	inc=width/(ppmLength*20);
	else if(ppmLength<=13.4)
	inc=width/(ppmLength*10);
	return inc;
	
}
public static double NumOfTicMarks( double ppmLength){
    double num = 0;

    if(ppmLength<=0.02)
	num=ppmLength/0.0001;   
	else if(ppmLength<=0.04)
	num=ppmLength/0.0002;
	else if(ppmLength<=0.1)
	num=ppmLength/0.0005;
	else if(ppmLength<=0.133)
	num=ppmLength/0.001;
	else if(ppmLength<=0.4)
	num=ppmLength/0.002;
	else if(ppmLength<=1)
	num=ppmLength/0.005;
	else if(ppmLength<=1.3)
	num=ppmLength/0.01;
	else if(ppmLength<=2.6)
	num=ppmLength/0.02;
	else if(ppmLength<=10)
	num=ppmLength/0.05;
	else if(ppmLength<=13.3)
	num=ppmLength/0.1;

    return num;

    }

   }


